import { get, post } from "../utils/Request"

export const getConfigServer = () => <any> get('/api/client/get_app_config')
export const getCategoryServer = () => <any>get(`/api/client/category_list`)
export const getClientListServer = (id: number) => <any>get(`/api/client/index_list1?category_id=${id}`)
export const registerServer = () => <any>get('/api/app_user/register_user')
export const getUserInfoServer = (id: number) => <any>get(`/api/app_user/get_user_info?user_id=${id}`)
export const updateUserInfoServer = (data:any) => <any>post('/api/app_user/update_other_info' , data)
export const accountLoginServer = (data:any) => <any>post('/api/app_user/account_login' , data)
export const resultListServer = (pagesize:number,page:number) => <any>get(`/api/client/result_list?pagesize=${pagesize}&page=${page}`)
export const getUserImgListServer = (id:number) => <any>get(`/api/client/get_user_img_list?user_id=${id}`)
export const uploadFileServer = (data:any) => <any>post(`/api/file/upload_new` , data ,'multipart/form-data' )
export const createStylerServer = (data:any) => <any>post('/api/client/create_cartoon_task1' , data)
export const createStickerServer = (data:any) => <any>post('/api/client/create_sticker_task' , data)
export const createFaceSwapServer = (data:any) => <any>post('/api/client/create_faceswap_task' , data)